package com.mm.fam.web.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zt
 * @since 2018-09-30
 */
public class SysMenu extends Model<SysMenu> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 界面映射图标
     */
    private String icon;
    /**
     *
     */
    @TableField(value  = "`key`")
    private String key;
    /**
     * 菜单名
     */
    private String name;

    /**
     * 组建名
     */
    private String component;
    /**
     * 连接地址
     */
    private String url;
    /**
     * 如果是第一级，父类ID为0；
     */
    private Integer parentId;
    /**
     * 例如admin:delete样式
     */
    private String code;
    /**
     * 1：第一级；2：第二级，以此类推
     */
    private Integer level;
    /**
     * 0：不可用；1：可用
     */
    private Integer status;

    /**
     * 第一次创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;
    /**
     * 菜单栏显示排序
     */
    private Integer sorter;

    /**
     * 角色id
     */
    private Integer roleId;
    /**
     * 是否隐藏
     */
    private Integer hidden;
    /**
     * 分页-从第几页开始
     */
    @TableField(exist = false)
    private Integer current;
    /**
     * 分页-么有
     */
    @TableField(exist = false)
    private  Integer pageSize;

    /**
     * 不知道用来做什么的
     */
    @TableField(exist = false)
    private  String cd;
    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<SysMenu> Children;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getSorter() {
        return sorter;
    }

    public void setSorter(Integer sorter) {
        this.sorter = sorter;
    }

    public Integer getCurrent() {
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getCd() {
        return cd;
    }

    public void setCd(String cd) {
        this.cd = cd;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public List<SysMenu> getChildren() {
        return Children;
    }

    public void setChildren(List<SysMenu> children) {
        Children = children;
    }

    public Integer getHidden() {
        return hidden;
    }

    public void setHidden(Integer hidden) {
        this.hidden = hidden;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysMenu{" +
        "id=" + id +
        ", name=" + name +
        ", level=" + level +
        ", parentId=" + parentId +
        ", code=" + code +
        ", status=" + status +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", icon=" + icon +
        ", url=" + url +
        ", sorter=" + sorter +
        "}";
    }
}
